home *** CD-ROM | disk | FTP | other *** search
- /* PutBrushPT&ST.oprx: ARexx script for OpalPaint to paste a brush in both
- * the stencil and paint modes in the same position. Use for a quick mask
- * for text and other brushes, without having to worry about finding the
- * exact place that you stamped your brush. Stencil is done first, so the
- * paint mode can be undone. Invert the stencil and recolor text, etc.
- ***** Brian Wind, February 3, 1993 *****
- * Install in your OpalPaint rexx directory (opalpaint:rexx) or wherever
- * you store your ARexx scripts (rexx:). Use OpalPaint's ARexx Control Item
- * to set this script to a function key (i.e. type the script name into one
- * of the function key boxes). Then make a brush in B1, B2, or B3. Press
- * Amiga key and function key together, and follow the directions.
- * After running script, you can go to ST mode, invert the stencil, return
- * to paint mode and recolor, rubthru or alter the area under the stamp.
- * Note: using a small rectangular brush doesn't work quite right in
- * OpalPaint 1.4.
- */
-
- address 'OpalPaint_Rexx'
-
- options Results
-
- /*SaveSetUp*/
-
- AskInt 1 3 "Brush Number (1-3), click OK for default: Brush 1\nClick Cancel to abort."
- if RC>4 then exit
- else BN=result
-
- /* if okay was pressed and no number was entered, use default brush 1 */
- if BN=="" then BN=1
-
- /* Set active brush */
- ActiveBrush BN
-
-
- /*
- A1="To invert the stencil before placing the brush click Cancel.\n"
- A2="Use this if you need to blow a hole into a stencil.\n"
- A3="Otherwise click OK to continue with normal procedure."
- AskBool A1 || A2 || A3
- if RC>5 then exit
- else invST=result
- */
-
-
- AskBool "Click on the image to paste\nor choose Cancel to abort."
- if RC>5 | result==0 then exit
-
-
- /* Let user click on image to place brush */
- GetPoint
- if RC>5 then exit
- parse var result PX PY
-
-
- /* Next statement for debug purposes */
- /*askbool invST' 'bn' 'PX' 'PY*/
-
- /*Busy*/
-
- /* set to freehand drawing tool */
- FreeHand
-
- /* turn on stencil mode, invert if chosen, put brush at selected position */
- WorkMode STENCIL
-
- /**************************************************************************
- * If this line, and the next similar line are used along with the AskBool
- * above which sets invST, the program double stamps the brush when PutBrush
- * is used and invST=0 (Cancel is chosen for invert stencil askbool). This
- * is shown by either no hole being cut into mask or if the cursor is moved
- * quickly after chosing the position, there are 2 holes cut into the mask
- * To test use a mask (stencil) which covers the entire screen.
- **************************************************************************/
- /*if invST=0 then InvertSten*/
- PutBrush PX PY
-
- /* invert stencil back to pre script state */
- /*if invST=0 then InvertSten*/
-
- /* flip to paint mode and turn off stencil to paint brush */
- WorkMode IMAGE
- StenEnable 0
- ColorSource MULTICOLOR
- PutBrush PX PY
-
- /*NotBusy*/
-
- /* To return your original setup (i.e. sten on, AL mode, tran etc.), remove
- * the comment markers on the next line. Be forewarned that this will not
- * allow you to undo the last painting step */
- /*RestoreSetUp*/
-
- /* or remove the comments around this group of commands to give a simple
- * undo of stencil and paint (simple means that when the brush was stamped
- * in ST mode it could have already masked some other detail in your
- * stencil and this can not be undone */
- /*
- TB1="Click Cancel to undo the procedure.\n"
- TB2="The stencil will be stamped in reverse,\n"
- TB3="any detail covered up is already lost."
- AskBool TB1 || TB2 || TB3
- if RC>5 | Result==1 then exit
- else
- do
- Undo
- WorkMode STENCIL
- if invST=1 then InvertSten
- PutBrush PX PY
- if invSt=1 then InvertSten
- WorkMode IMAGE
- StenEnable 0
- end
- RestoreSetUp
- */
-
- exit
-